# -*- coding: utf-8 -*-
import multiprocessing

def init_process():
    print('start', multiprocessing.current_process().name)

def do_something(param):
    return param * 2

if __name__ == '__main__':
    multiprocessing.freeze_support()
    pool = multiprocessing.Pool(multiprocessing.cpu_count(), initializer=init_process)
    inputs = range(100)
    outputs = pool.map(do_something, inputs)
    pool.close()
    pool.join()
    print(outputs)
